e4fb7b
@@ -643,7 +643,7 @@
void close(boolean keepDagFilesDir) throws Exception {
     appJarLr = null;
 
     try {
-      if (session != null) {
+      if (getSession() != null) {
         LOG.info("Closing Tez Session");
         closeClient(session);
         session = null;
